package com.briup.estore.service.impl;

import com.briup.estore.bean.extend.CategoryExtend;
import com.briup.estore.dao.extend.CategoryExtendMapper;
import com.briup.estore.service.CategoryService;
import com.briup.estore.util.MyBatisSqlSessionFactory;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class CategoryServiceImpl implements CategoryService {
    private CategoryExtendMapper categoryExtendMapper;

    {
        SqlSession sqlSession = MyBatisSqlSessionFactory.openSession();
        categoryExtendMapper = sqlSession.getMapper(CategoryExtendMapper.class);
    }

    @Override
    public List<CategoryExtend> selectAll() {
        return categoryExtendMapper.selectAll();
    }
}
